﻿using J.Model;
using J.ProductGet.Application.Command.ReservationinformationtableCommand;
using MediatR;
using SqlSugar;

namespace J.ProductGet.Application.CommandHandler.ReservationinformationtableCommandHandler
{
    public class INFORMATIONTYPETABLEGetCommandHandler : IRequestHandler<INFORMATIONTYPETABLEGetCommand, List<INFORMATIONTYPETABLE>>
    {
        private readonly ISqlSugarClient _sqlSugarClient;
        public INFORMATIONTYPETABLEGetCommandHandler(ISqlSugarClient sqlSugarClient)
        {
            _sqlSugarClient = sqlSugarClient;
        }
        public async Task<List<INFORMATIONTYPETABLE>> Handle(INFORMATIONTYPETABLEGetCommand request, CancellationToken cancellationToken)
        {
            return await _sqlSugarClient.Queryable<INFORMATIONTYPETABLE>().ToListAsync();
        }
    }
}
